
<#assign classNameLower = ClassName ? uncap_first>
package ${pPackage}.controller;

import com.hengyun.ms.basic.pojo.Result;
import com.hengyun.ms.user.api.entity.SysUser;
import com.hengyun.ms.user.provider.service.SysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户控制层
 *
 * @author peixinyi
 * @date 2022-3-21 15:24
 */
@RestController
@RequestMapping("v1//${classNameLower}")
public class ${ClassName}Controller {


    ${ClassName}Service ${classNameLower}Service;

    public ${ClassName}Controller( ${ClassName}Service ${classNameLower}Service) {
        this.${classNameLower}Service = ${classNameLower}Service;
    }

    /**
     * 根据邮件获取用户信息
     *
     * @param email 邮件
     * @return com.hengyun.ms.basic.pojo.Result<com.hengyun.ms.user.api.entity.SysUser>
     * @author PeiXy_J
     * @since 15:47 2022-3-21
     */
    @GetMapping("/getUserByEmail")
    public Result<${ClassName}> getUserByEmail(@RequestParam("email")String email) {
        return Result.ok(${classNameLower}Service.getUserByEmail(email));
    }

}
